package com.company;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        //System.out.println("请输入26个整数分别作为widths数组的元素");
        int[] widths = new int[26];
        for(int i = 0; i < 26; i++){
            //widths[i] = sc.nextInt();
            widths[i] = 10;
        }
        System.out.println("请输入字符串S");
        String s = sc.next();
        int[] ans = numberOfLines(widths,s);
        System.out.println("[" + ans[0] + " " + ans[1] + "]");

    }

    public static int[] numberOfLines(int[] widths, String s) {
        int lines = 1;
        int width = 0;
        for (int i = 0; i < s.length(); i++)
        {
            int len = widths[s.charAt(i) - 'a'];
            width += len;
            if (width > 100)
            {
                lines++;
                width = len;
            }
        }
        return new int[]{lines, width};

    }
}
